//
//  WebServiceManager.h
//  smarthings
//
//  Created by Stefan Tsvyatkov on 10/20/14.
//  Copyright (c) 2014 Stefan Tsvyatkov. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^SuccessResponseBlock)(id response);
typedef void (^FailureResponseBlock)(NSError * error);

@interface SMTWebServiceManager : NSObject

+ (SMTWebServiceManager *)sharedInstance;

- (NSString *)baseServerURL;
- (void)setBaseServerURL:(NSString *)baseServerURL;

- (void)getThingsList:(SuccessResponseBlock)success
              failure:(FailureResponseBlock)failure;

- (void)getAttributesForHref:(NSString *)href
                     success:(SuccessResponseBlock)success
                     failure:(FailureResponseBlock)failure;

- (void)getThingPropertyTypesList:(SuccessResponseBlock)success
                          failure:(FailureResponseBlock)failure;

- (void)getThingActionTypesList:(SuccessResponseBlock)success
                        failure:(FailureResponseBlock)failure;

- (void)addThing:(NSDictionary *)thing
         success:(SuccessResponseBlock)success
         failure:(FailureResponseBlock)failure;

- (void)deleteThing:(NSString *)thingUUID
            success:(SuccessResponseBlock)success
            failure:(FailureResponseBlock)failure;

- (void)executeAction:(NSString *)href
              success:(SuccessResponseBlock)success
              failure:(FailureResponseBlock)failure;

- (void)getPropertyValue:(NSString *)href
                 success:(SuccessResponseBlock)success
                 failure:(FailureResponseBlock)failure;

@end
